
import React, { Component } from 'react';
import { Redirect, Switch ,Route} from 'react-router-dom';
import Tabber from '../components/Tabber';
import Home from './Home';
import CategoryPage from './CategoryPage'
import AllPro from './AllPro'
import Me from './Me'
import Cart from './Cart'
import NotFound from '../components/NotFound';

class Index extends Component {
    render() {
        return (
            <div className='index'>
               <Switch>
                <Route exact path='/index/home' component={Home}/>
                <Route exact path='/index/cate' component={CategoryPage}/>
                <Route exact path='/index/allgoods' component={AllPro}/>
                <Route exact path='/index/cart' component={Cart}/>
                <Route exact path='/index/me' component={Me}/>
                <Redirect exact from='/index' to='/index/home'/>
                <Route path='*' component={NotFound}/>
               </Switch>

                {/* 底部导航 */}
                <Tabber></Tabber>
            </div>
        );
    }
}

export default Index;